<div id="pGroups" class="page">
    <div class="pageTitle">
        <h1><?php echo $this->translate('groups'); ?></h1>
        <div class="pageTitleLink">
            <a 
                href="<?php echo $this->url(array('controller' => 'groups', 'action' => 'create'), 'default', true); ?>"
                title="<?php echo $this->translate('create_group'); ?>"
            >
                <?php echo $this->translate('create_group'); ?>
            </a>
        </div>
        <div class="clear"></div>
    </div>

    <div class="groupList">
        <div class="listTitle">
            <div class="field w50px">&nbsp;</div>
            <div class="field w650px"><?php echo $this->translate('name'); ?></div>
            <div class="field xCenter w100px"><?php echo $this->translate('created_at'); ?></div>
            <div class="field xCenter w100px"><?php echo $this->translate('action'); ?></div>
        </div>
        <?php foreach ($this->paginator as $group): ?>

        <div class="listItem">
            <div class="field xCenter w50px">
                <?php echo $group->id; ?>

            </div>
            <div class="field w650px">
                <a href="<?php echo $this->url(array('id' => $group->id), 'group_profile', true); ?>"
                   title="<?php echo $this->escape($group->name); ?>">
                    <?php echo $this->escape($group->name); ?></a>
            </div>
            <div class="field xCenter w100px">
                <?php echo $this->date($group->created_at, Ext_View_Helper_Date::FORMAT_DDMMYYYY); ?>

            </div>
            <div class="field xCenter w100px">
                <?php if ($this->authMember): ?>
                <a href="<?php echo $this->url(array('controller' => 'groups', 'action' => 'edit', 'id' => $group->id), 'default', true); ?>">
                    <?php echo $this->translate('edit'); ?>
                </a>
                <?php endif; ?>

            </div>
            <div class="clear"></div>
        </div>
        <?php endforeach; ?>

    </div>
    <div class="nav">
        <?php echo $this->paginator->count() > 1 ? $this->paginationControl(
            $this->paginator, 'Sliding', '_partials/paginator/default.phtml') : ''; ?>
        
    </div>
</div>